Fix DOM Clobbering Vulnerability in IAST Shim#8
Conversation
This commit fixes a critical DOM Clobbering vulnerability that allowed a target application to disable the IAST analyzer by overwriting its global callback functions. The following changes have been implemented: 1. **Randomized Callback Names:** The Go backend now generates unique, session-specific names for the `sink_event`, `execution_proof`, and `shim_error` callbacks by appending a UUID. This prevents attackers from predicting the function names. 2. **Dynamic Probe Generation:** XSS probes are now generated dynamically to use the session-specific `execution_proof` callback name, ensuring payloads trigger the correct, non-clobberable function. 3. **Defense-in-Depth JS Closure:** The JavaScript shim has been hardened to immediately capture the exposed callback functions into a local closure upon initialization. All internal reporting now uses these captured references, making the shim immune to DOM Clobbering that occurs after it has loaded. 4. **Updated Tests:** All relevant unit tests have been updated to accommodate the dynamic nature of the callback names, ensuring the test suite passes and validates the new behavior.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
This commit fixes a critical DOM Clobbering vulnerability that allowed a target application to disable the IAST analyzer by overwriting its global callback functions. The following changes have been implemented: 1. **Randomized Callback Names:** The Go backend now generates unique, session-specific names for the `sink_event`, `execution_proof`, and `shim_error` callbacks by appending a UUID. This prevents attackers from predicting the function names. 2. **Dynamic Probe Generation:** XSS probes are now generated dynamically to use the session-specific `execution_proof` callback name, ensuring payloads trigger the correct, non-clobberable function. 3. **Defense-in-Depth JS Closure:** The JavaScript shim has been hardened to immediately capture the exposed callback functions into a local closure upon initialization. All internal reporting now uses these captured references, making the shim immune to DOM Clobbering that occurs after it has loaded. 4. **Updated Tests:** All relevant unit tests have been updated to accommodate the dynamic nature of the callback names, ensuring the test suite passes and validates the new behavior. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit fixes a critical DOM Clobbering vulnerability that allowed a target application to disable the IAST analyzer by overwriting its global callback functions. The following changes have been implemented: 1. **Randomized Callback Names:** The Go backend now generates unique, session-specific names for the `sink_event`, `execution_proof`, and `shim_error` callbacks by appending a UUID. This prevents attackers from predicting the function names. 2. **Dynamic Probe Generation:** XSS probes are now generated dynamically to use the session-specific `execution_proof` callback name, ensuring payloads trigger the correct, non-clobberable function. 3. **Defense-in-Depth JS Closure:** The JavaScript shim has been hardened to immediately capture the exposed callback functions into a local closure upon initialization. All internal reporting now uses these captured references, making the shim immune to DOM Clobbering that occurs after it has loaded. 4. **Updated Tests:** All relevant unit tests have been updated to accommodate the dynamic nature of the callback names, ensuring the test suite passes and validates the new behavior. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit fixes a critical DOM Clobbering vulnerability that allowed a target application to disable the IAST analyzer by overwriting its global callback functions. The following changes have been implemented: 1. **Randomized Callback Names:** The Go backend now generates unique, session-specific names for the `sink_event`, `execution_proof`, and `shim_error` callbacks by appending a UUID. This prevents attackers from predicting the function names. 2. **Dynamic Probe Generation:** XSS probes are now generated dynamically to use the session-specific `execution_proof` callback name, ensuring payloads trigger the correct, non-clobberable function. 3. **Defense-in-Depth JS Closure:** The JavaScript shim has been hardened to immediately capture the exposed callback functions into a local closure upon initialization. All internal reporting now uses these captured references, making the shim immune to DOM Clobbering that occurs after it has loaded. 4. **Updated Tests:** All relevant unit tests have been updated to accommodate the dynamic nature of the callback names, ensuring the test suite passes and validates the new behavior. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This submission fixes a critical DOM Clobbering vulnerability in the IAST shim. The changes include randomizing the JavaScript callback names for each session, dynamically updating the XSS probes to use these names, and implementing a defense-in-depth closure in the JavaScript shim to protect against the overwriting of global functions. All relevant tests have been updated to reflect these changes.
PR created automatically by Jules for task 2359232012618541600 started by @xkilldash9x